package main

//参数获取
import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	r := gin.Default()

	//http://localhost:8080/stu?name=ttt&age=12
	r.GET("/stu", func(context *gin.Context) {
		name := context.Query("name")
		var age = context.DefaultQuery("age", "defaultAge")
		context.String(http.StatusOK, "%s,%s", name, age)
	})
	r.Run()
}
